﻿
//
// 版权所有 (c) 2021-2023 JR
//
// 特此免费授予获得本软件的任何人以处理本软件的权利，但须遵守以下条件：在所有副本或重要部分的软件中必须包括上述版权声明和本许可声明。
//
// 软件按“原样”提供，不提供任何形式的明示或暗示的保证，包括但不限于对适销性、适用性和非侵权的保证。
// 在任何情况下，作者或版权持有人均不对任何索赔、损害或其他责任负责，无论是因合同、侵权或其他方式引起的，与软件或其使用或其他交易有关。

namespace EMC.VISITOR.Core;

/// <summary>
/// 通用常量
/// </summary>
[Const("平台配置")]
public class CommonConst
{
    public const string sysSuperManager = "superadmin";
    /// <summary>
    /// 演示环境开关
    /// </summary>
    public const string SysDemoEnv = "sys_demo";

    /// <summary>
    /// 默认密码
    /// </summary>
    public const string SysPassword = "sys_password";

    /// <summary>
    /// 登录二次验证
    /// </summary>
    public const string SysSecondVer = "sys_second_ver";

    /// <summary>
    /// 开启图形验证码
    /// </summary>
    public const string SysCaptcha = "sys_captcha";

    /// <summary>
    /// 开启水印
    /// </summary>
    public const string SysWatermark = "sys_watermark";

    /// <summary>
    /// 开启操作日志
    /// </summary>
    public const string SysOpLog = "sys_oplog";

    /// <summary>
    /// Token过期时间
    /// </summary>
    public const string SysTokenExpire = "sys_token_expire";

    /// <summary>
    /// RefreshToken过期时间
    /// </summary>
    public const string SysRefreshTokenExpire = "sys_refresh_token_expire";

    /// <summary>
    /// 单用户登录
    /// </summary>
    public const string SysSingleLogin = "sys_single_login";

    /// <summary>
    /// 系统管理员角色编码
    /// </summary>
    public const string SysJRRole = "sys_JR";

    /// <summary>
    /// 开启全局脱敏处理（默认不开启）
    /// </summary>
    public static bool SysSensitiveDetection = false;

    /// <summary>
    /// 报工规则
    /// </summary>
    public const string MesReportForWorkRule= "mes_report_for_work_rule";

    /// <summary>
    /// 品检规则
    /// </summary>
    public const string MesQaRule = "mes_qa_rule";
    /// <summary>
    /// 切割字符串
    /// </summary>
    public const string SplitString = ",";
    /// <summary>
    /// 系统流水号间隔默认符号
    /// </summary>
    public const string SysDefaultSerialNumberJoinString = "";
    /// <summary>
    /// 系统默认流水号长度
    /// </summary>
    public const int SysDefaultSerialNumberLenth = 9;

    /// <summary>
    /// 手动修改SAP状态,MES的条件状态
    /// </summary>
    public const string HandChangeSapStatus = "handChangeSapStatus";
    /// <summary>
    /// 自动报工工序是否能手动报工
    /// </summary>
    public const string AutoCanSubmitReport = "open_autostation_can_submit";

    /// <summary>
    /// 报工SAP的指定订单号
    /// </summary>
    public const string NeedReportSapOrders = "needReportSapOrders";
    /// <summary>
    /// 订单报工开始时间 （订单的创建时间从此配置往后的时间才报工）
    /// </summary>
    public const string NeedReportSapWorkOrderCreateTime = "needReportSapWorkOrderCreateTime";

    /// <summary>
    /// 停工是否必须填写操作人   Value:  True:必须填写操作人   False:不必须填写
    /// </summary>
    public const string StopOrderNeedOperateUser = "stopOrderNeedOperateUser";
    /// <summary>
    /// 撤回操作是否必须填写操作人  Value:  True:必须填写操作人   False:不必须填写
    /// </summary>
    public const string CancelOrderNeedOperateUser = "cancelOrderNeedOperateUser";

    /// <summary>
    /// 非正常模式不能开工      Value: True:正常模式才能开工 False:任何模式都能开工
    /// </summary>
    public const string NormalModeCanStart = "normalModeCanStart";

    /// <summary>
    /// 整个库迁移:配置迁移信息
    /// </summary>
    public const string BakDataBase = "bakDataBase";

    /// <summary>
    /// 数据迁移同步分页最大尺寸
    /// </summary>
    public const string TransferPageSize = "transferPageSize";

    /// <summary>
    /// 开发环境是否跳过第三方交互
    /// </summary>
    public const string JumpOtherSystemApi = "jumpOtherSystemApi";

    /// <summary>
    /// 系统接口配置导入DLL间隔天
    /// </summary>
    public const string SysApiDllDaycount = "sys_api_dll_rangecount";

    /// <summary>
    /// 撤回派工单：验证当前的撤回工单完工数量是否小于下一道工序的完工数量
    /// </summary>
    public const string RevocationCheckNextProcessQty = "revocationCheckNextProcessQty";
    /// <summary>
    /// 撤回派工单：处理SAP同时处理上报SAP的数据
    /// </summary>
    public const string RevocationHandlerReportSapData = "revocationHandlerReportSapData";
    /// <summary>
    /// 指定派工单：当前派工单的完工总数不能大于上一道工序的总完工数量
    /// </summary>
    public const string AppointCheckLastProcessQty = "appointCheckLastProcessQty";
    /// <summary>
    /// 忽略的工序
    /// </summary>
    public static List<string> IgnoreProcessList = new List<string> { "领料", "入库" };
    /// <summary>
    /// 人工工序
    /// </summary>
    public static List<string> HandWorkProcessList = new List<string> { "人工", "手工" };

    public static string StorageCode = "HZWGB"; //顶级仓库代码
}